const state = {
    _token: '',
    _userInfo: {} 
}

const getters = {
    token: state => state._token,
    userInfo : state => state._userInfo
}

const actions = {
    setToken({commit},token){
        commit('set_token',token)
    }
}

const mutations = {
    set_token(state,token){
        state._token = token
    }
}

export default {
    namespaced:true,
    state,
    getters,
    actions,
    mutations
}